<template>
    <div>
      <el-card style="width: 90%; margin: auto;">
        <el-table id="data" :data="dataList" stripe style="width: 100%">
          <el-table-column type="index" label="#" width="70"> </el-table-column>
          <el-table-column prop="id" label="id" width="70"> </el-table-column>
          <el-table-column prop="gpsTime" label="GPS时间" width="130">
          </el-table-column>
          <el-table-column prop="longitude" label="经度" width="110">
          </el-table-column>
          <el-table-column prop="latitude" label="纬度" width="110">
          </el-table-column>
          <el-table-column prop="x" label="x" width="110">
          </el-table-column>
          <el-table-column prop="y" label="y" width="110">
          </el-table-column>
          <el-table-column prop="speed" label="速度" width="70">
          </el-table-column>
          <el-table-column prop="course" label="航向" width="70">
          </el-table-column>
          <el-table-column prop="status" label="状态" width="80">
          </el-table-column>
          <el-table-column prop="width" label="幅宽" width="70">
          </el-table-column>
          <el-table-column prop="depth" label="深度" width="70">
          </el-table-column>
          <el-table-column prop="standard" label="标准值" width="70">
          </el-table-column>
          
        </el-table>
      
      <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="searchModel.pageNo"
      :page-sizes="[5, 10, 20, 50]"
      :page-size="searchModel.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
    </el-card>
    </div>
  </template>
  
  <script>
  import userApi from "../../api/sys";
  export default {
    data() {
      return {
        total: 0,
        searchModel: {
            pageNo: 1,
            pageSize: 10
        },
        dataList: [],
      }
    },
    methods: {

      handleSizeChange(pageSize) {
        this.searchModel.pageSize = pageSize;
        this.getList();
      },
      
      handleCurrentChange(pageNo) {
        this.searchModel.pageNo = pageNo;
        this.getList();
      },

      getList() {
        userApi.listregularPage(this.searchModel).then((resp) => {
            this.dataList = resp.data.rows;
            this.total = resp.data.total;
        })
      },
    },
    created() {
      this.getList();
    },
  }
  </script>
  
  <style>
  
  </style>